home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 144 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.1 KB

  1. From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
  2. Message-ID: <9601260532.14152@mulga.cs.mu.OZ.AU>
  3. X-Original-Date: Fri, 26 Jan 1996 16:32:02 +1100
  4. Path: in2.uu.net!bounce-back
  5. Date: 26 Jan 96 07:50:08 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Re: Give operator. a chance
  9. Organization: Computer Science, University of Melbourne, Australia
  10. References: <3102AD11.1663@et.se> <4e0pj1$rq6@news.bridge.net>
  11. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  12.     iQBFAgUBMQiH2eEDnX0m9pzZAQFT1QF/RG2xsdy0ALEjzQ/M9Ewp1fD25oSeQ3Cw
  13.     D6HrwisoHajqdB/miZYUvId+ZCr5ZDd4
  14.     =tjTn
  15.  
  16. I agree with Joe Buck - this issue is at this stage dead and buried, at
  17. least for this round of standardization.  But I can't let comments like
  18. these pass unchallenged ;-)
  19.  
  20. David Byrden <100101.2547@compuserve.com> writes:
  21.  
  22. >New facilities are not added to the C++ language when their effect can be 
  23. >attained by a little programming using existing facilities.
  24. >
  25. >From your description, it seems to me that an your operator.() object 
  26. >method would return a reference to another object, and the named member 
  27. >function would be called in that object. For example, here is class 
  28. >Handle acting as a proxy for a class Bitmap;
  29. [...]
  30. >Operator.() was not overloaded because you can achieve exactly this same 
  31. >effect without it,
  32.  
  33. Perhaps you can in this particular case...
  34.  
  35. >if the clas Handle has a set of member functions matching those in Bitmap,
  36.  
  37. ... but only with a lot of tedious programming.  Furthermore, all those
  38. forwarding functions are a maintenance problem; every time you add
  39. a new function to Bitmap, you need to remember to add one to Handle.
  40.  
  41. Now, please tell me how to write a template smart reference class without
  42. using operator.()?  Can I attain that effect "with a little programming
  43. using existing facilities"?  I think not.
  44.  
  45. --
  46. Fergus Henderson                 WWW: http://www.cs.mu.oz.au/~fjh
  47. fjh@cs.mu.oz.au                  PGP: finger fjh@128.250.37.3
  48. ---
  49. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  50.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  51.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  52.